package urna;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

public class Teclado extends Entrada implements KeyListener {

	public Teclado(Seguridad s, Configuracion c, GestordeDatos g) {
		super(s, c, g);
	}

	@Override
	protected void enviarCRV() {
		
		gestor.cierredeVotacion();
		
	}

	public void keyPressed(KeyEvent e) {
		int key = e.getKeyCode();
		
		switch (key) {
		case KeyEvent.VK_ENTER:
			enviarCRV();break;
		case KeyEvent.VK_SPACE:
			gestor.pedirLogin(this);break;
		}	
	}

	public void keyReleased(KeyEvent e) {

	}

	public void keyTyped(KeyEvent e) {
			
	}

}
